<template>
  <div class="box">
    <div class="mask">
      <div class="con">
        <h3>增加</h3>
        <div class="ent">标题：<input type="text" /></div>
        <div class="ent">内容：<input type="text" /></div>
        <button>确定</button>
        <button @click="cancel">取消</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {};
  },
  methods: {
    cancel() {
      this.$emit("cD", false);
    },
  },
};
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}

h3 {
  background-color: rgb(245, 126, 14);
  color: #fff;
  margin-bottom: 30px;
  text-align: center;
}

.mask {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
}

.mask .con {
  width: 250px;
  height: 200px;
  background-color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mask .con .ent {
  margin-left: 15px;
}

button {
  width: 45px;
  height: 30px;
  background-color: rgb(208, 10, 235);
  outline: none;
  margin: 35px 0 0 55px;
}
</style>
